﻿namespace Grove.Gameplay.Tournaments
{
  public class TournamentRunner
  {
    private readonly Tournament.IFactory _tournamentFactory;

    public TournamentRunner(Tournament.IFactory tournamentFactory)
    {
      _tournamentFactory = tournamentFactory;
    }

    public Tournament Current { get; private set; }

    public void Start(TournamentParameters p)
    {
      Current = _tournamentFactory.Create(p);
      Current.Start();
    }

    public void Stop()
    {
      Current.Stop();
    }
  }
}